{template 'phpcms','header'}
<script language="JavaScript">
<!--
function killerrors() { 
return true; 
}
window.onerror = killerrors;
//-->
</script>
<style type="text/css" >
#bimg img { 
vertical-align: middle;
max-width:600px;   /* FF IE7 */
width:expression(this.width > 600 && this.width > this.height ? 600 : true);
overflow:hidden;
}
</style>
<!--begin main-->
<div id="main">
  <!--begin left-->
  <div id="main_l" class="bdr_1">
    <!--位置导航-->
	<div id="position"><a href="">首页</a>{catpos($catid)}</div>
    <div id="content">
    <div id="content_head">
      <!--文章标题-->
      <h1>{$title}</h1>
      <!--基本属性-->
      <h2><span>{$updatetime}</span> 作者：{if $author}{$author}{else}{$userid}{/if} 来源：{$copyfrom} 浏览次数：<span id="hits">0</span>
	  {if isset($MODULE[comment])}{php list($keyid, $verify) = keyid_make('phpcms', 'content', 'title', $contentid);}
		<a href="{$MODULE[comment][url]}?keyid={$keyid}&verify={$verify}" style="color:red;">网友评论 <span id="comments_top">0</span> 条</a>
		{/if}</h2></div>
      <!--begin 图片浏览-->

<div id="ArticleCnt">
  <a id="p" name="p"></a>
  <div id="lantern">
  <!--播放工具-->
    <div id="tool">
      <div class="f_l">
        <select id="cSpeed" onchange="SaveTime()" style="display: none;">
          <option value="6" selected="selected">中</option>
        </select>
        <input style="display: inline;" id="startplay" title="播放/暂停" src="images/picture/9423081.gif" onclick="playpic()" align="absmiddle" type="image">
        <input id="stopplay" title="播放/暂停" src="images/picture/9423085.gif" style="display: none;" onclick="stop()" align="absmiddle" type="image">
		{if $page==1}<img src="images/picture/9423087.gif" align="absmiddle" width="48" height="22">
		{else}<a href="javascript:changeUrl({max(intval($page-1),1)})"><img src="images/picture/9423087.gif" alt="上一张" align="absmiddle" width="48" height="22"></a>{/if}
		{if $page==$images_number}&nbsp;
		<img src="images/picture/9423077.gif" align="absmiddle" width="48" height="22">
		{else}
		<a href="javascript:changeUrl({min(intval($page+1),$images_number)})"><img src="images/picture/9423077.gif" alt="下一张" align="absmiddle" width="48" height="22"></a>
		{/if}
        <select id="pagejump" onchange="changeUrl(this.value)">
		{loop $array_images $j $img}
          <option value="{$j}" {if $j==$page}selected{/if}>{$j}/{$images_number}张</option>
		{/loop}
        </select>
      </div>
      <div class="f_r"> <a href="{$array_images[$page][filepath]}" target="_blank"><img src="images/picture/9423079.gif" border="0" width="60" height="22"></a> </div>
      <div class="clear"></div>
    </div>
    <!--正中大图-->
    <div id="bimg"><a href="javascript:changeUrl({min($page+1,$images_number)})"><img style="cursor: pointer;" src="{$array_images[$page][filepath]}" alt="点击浏览下一张" ></a>
	{if $array_images[$page][description]}<div id="Explain">{$array_images[$page][description]}</div>{/if}
    </div>

    <div id="simg">
      <div class="p">
      {if ($page > 6)}
      <a href="javascript:changeUrl({intval(floor($page/6)*6-5)})"><img src="images/picture/9423218.gif" alt="上一组"></a>
      {else}
      <img src="images/picture/9423218.gif">
      {/if}
    </div>
      <div id="sImage">
		{loop $array_images $k $r}
		{php if(($k<ceil($page/6)*6-5) || ($k>ceil($page/6)*6)) continue;}
		 <div><a href="javascript:changeUrl({$k})"><img src="{thumb($r[filepath], 60, 60)}" alt="点击浏览大图" width="60" height="60" {if $k==$page}class="s"{/if}/></a></div>
		{/loop}
      </div>
      <div class="n"><a href="javascript:changeUrl({min(ceil($page/6)*6+1,$images_number)})"><img src="images/picture/9423216.gif" alt="下一组"></a></div>
    </div>
  </div>
  <div id="hdcnt"></div>
</div>

      <!--end 图片浏览-->
     <!--图片介绍-->
      <div id="digest"><strong>图片介绍：</strong>{$description}</div>
      
<!--心情指数模块-->
      {if isset($MODULE[mood])}
      <div id="moodrank_div"></div>
      <script  type="text/javascript">var contentid = {$contentid};</script>
      <script type="text/javascript" id="callback_js"></script>
      <script type="text/javascript" src="data/moodrank/1.js"></script>
      {/if}
      {if isset($MODULE[digg])}
      <div id="digg_div"></div>
	  <script  type="text/javascript">var contentid = {$contentid}; var catid = {$catid}</script>
	  <script type="text/javascript" id="calldigg_js"></script>
      <script type="text/javascript" src="{$MODULE[digg][url]}digg.php?contentid={$contentid}&catid={$catid}"></script>
      {/if}
      <!--快速链接-->
	<div class="clear"></div>
      {if isset($MODULE[mail])}
      <form action="{$MODULE[mail][url]}sendmail.php" name="sendmail" id="sendmail">
        <input type="hidden" name="title" value="推荐：{$title}" />
        <input type="hidden" name="content" value=" <a href='{SITE_URL}{$url}' target='_blank'>{$title}</a><br/>" />
      </form>
      {/if}
      {if isset($MODULE[error_report])}
      <form action="{$MODULE[error_report][url]}error_report.php" name="errors" id="errors">
        <input type="hidden" name="title" value="{$title}" />
		<input type="hidden" name="contentid" value="{$contentid}" />
      </form>
      {/if}      
      <h3 class="align_r">{if isset($MODULE[error_report])}<a href="javascript:$('#errors').submit();">[错误报告]</a>{/if} {if isset($MODULE[mail])}<a href="javascript:$('#sendmail').submit();">[推荐]</a>{/if} <a href="javascript:myAddPanel('{$title}',window.location.href)">[收藏]</a> <a href="javascript:window.print();">[打印]</a> <a href="javascript:window.close();">[关闭]</a> <a href="{SITE_URL}{$url}#top">[返回顶部]</a> </h3>
      <!--评论-->
      {if isset($MODULE[comment])}
      {php list($keyid, $verify) = keyid_make('phpcms', 'content', 'title', $contentid);}
      <div id="commnent_tag"><a href="{$MODULE[comment][url]}?keyid={$keyid}&verify={$verify}"><img src="images/comment.gif" alt=""/></a> 当前共有<strong class="c_red"><span id="comments">0</span></strong>人发表了评论.
      </div>
      <div class="commenttext" style="text-align:center;margin-top:2%">
        <form action="{$MODULE[comment][url]}?action=addpost" method="post" onSubmit="return checkForm();">
			<input type="hidden" name="keyid" value="{$keyid}"/>
			<input type="hidden" name="verify" value="{$verify}"/>
		<ul>
          <li>
            <textarea cols="100" rows="8" name="comment" id="comment" onfocus="reply_clearfield()" onblur="reply_restoration()"></textarea>
          </li>
          <li style="text-align:left;margin-left:1%;margin-top:1%;">
            <span id="checker"><div style="float:left">验证码：</div><input type="text" style="ime-mode: disabled;" size="6" id="checkcode" name="checkcode" /><img src="" id="code_img" style="display:none" onclick="this.src='checkcode.php?'+Math.random()" alt="点击换一张"></span>
            <input id="dosubmit" name="dosubmit" type="submit" value="发表评论" />
          </li>
        </ul>
        </form>
      </div>
       <script type="text/javascript" src="data/js/comment_setting.js"></script>
      <script>
        $().ready(function() {
            if(setting.ischecklogin == 0 && getcookie('auth') === null)
            {
                $('#comment').val("请您登陆后发表评论！");
                $('#comment').attr("disabled","disabled");
                $('#dosubmit').attr("disabled","disabled");
            }
            else 
            {
                $('#comment').val("我也来说两句！");
            }
        });
        function reply_restoration()
        {
            if($('#comment').val() == '')
            {
                $('#comment').val("我也来说两句！");
            }
        }
        function reply_clearfield()
        {
            if ($('#comment').val() == "我也来说两句！") 
            {
                $('#comment').val("");   
            }
			document.getElementById('code_img').style.display = 'block';document.getElementById('code_img').src='checkcode.php';
        }
        function checkForm()
        {
            if($('#comment').val() == '' || $('#comment').val() == "我也来说两句！")
            {
                alert("内容不能为空");
                $('#comment').focus();
                return false;
            }
            if($('#checkcode').val() == '' )
            {
                alert("验证码不能为空");
                $('#checkcode').focus();
                return false;
            }
            if ($('#comment').val().length > 1000) 
            {
                alert("内容太长，最多 1000 个文字");
                return false;
            }
        }
    </script>
      {/if} </div>
    <div class="clear" style="margin-top:1%"></div>    
    </div>
  <!--end left-->
  <!--begin right-->
  <div id="main_r" >
     <h4><a href="{$MODULE[special][url]}"><img src="images/more.gif" alt="更多" /></a>专题精选</h4>
    <div class="pic_txt_list">
      <!--在ul外单加一个DIV为了防止一些意想不到的问题-->
      <ul>
        {tag_首页推荐专题}
      </ul>
    </div>
    <h4>推荐图片新闻</h4>
    <div>
      <ul class="pic_list">
        {tag_推荐图片文章}
      </ul>
    </div>
    <h4><a href="{$MODULE[digg][url]}"><img src="images/more.gif" alt="更多" /></a>DIGG 周排行</h4>
    <div>
		<ul class="digg_text_list">
			<!--{get sql="select d.contentid,d.supports,c.title,c.style,c.url from phpcms_digg d left join phpcms_content c on d.contentid=c.contentid where c.status=99 AND c.catid='$catid' order by d.supports_week desc" rows="10"}-->
				<li><span>{$r[supports]}</span><a href="{$r[url]}" target="_blank" class="{$r[style]}">{str_cut($r[title], 44)}</a></li>
			<!--{/get}-->
      </ul>
    </div>
	<!--{block("list_picture", 1)}-->
  </div>
  <!--end right-->
</div>
<!--end main-->
<script language="JavaScript">
<!--
function changeUrl(id)
{
	{if $ishtml==1}
		var url = '{$show_url_path}';
		redirect(url+'_'+id+'.{$PHPCMS[fileext]}');
	{else}
		redirect("{SCRIPT_NAME}?contentid={$contentid}&page="+id);
	{/if}
}
var autoplay=false;
if(getcookie("autoplay") != null)
{
  if(getcookie("autoplay")=="1")
  {
   autoplay=true;
   $('#startplay').css('display','none');
   $('#stopplay').css('display','inline');
  }
  else
  {
	$('#startplay').css('display','inline');
	$('#stopplay').css('display','none');
  }
}
else
{
	stop();
}
if(autoplay)
{
	setInterval("play()",6000);
}
function playpic()
{ 
	
   $('#startplay').css('display','none');
   $('#stopplay').css('display','inline');
   setcookie("autoplay",1);
   play();
}
function play()
{
	var t = {$images_number};
	var page = {$page};
	if(t==page)
	{
		stop();
	}
	else
	{
		setInterval("changeUrl({min(intval($page+1),$images_number)})",6000);
	}
}
function stop()
{
	setcookie("autoplay",0);
	$('#startplay').css('display','inline');
	$('#stopplay').css('display','none');
}
//-->
</script>
<script language="JavaScript" src="count.php?contentid={$contentid}"></script>
{template 'phpcms','footer'}